package client.comm.baoding.dialog

import android.content.Context
import client.comm.baoding.R
import client.comm.baoding.databinding.LayoutMsgtitledialogBinding
import client.tzstore.oo.dialog.CenterDialog

open class MsgTitleDialog(context: Context) : CenterDialog<LayoutMsgtitledialogBinding>(context) {

    var title: String = ""
    var okTxt: String = ""
    var cancleTxt: String = "取消"
    var cancle: (() -> Unit)? = null
    var ok: (() -> Unit)? = null


    fun okClick() {
        ok?.invoke()
        cancel()
    }

    fun cancleClick() {
        cancle?.apply {
            this()
        }
        cancel()
    }

    override fun getV(): Int {
        return R.layout.layout_msgtitledialog
    }

    override fun postBinding() {
        binding.event = this
    }
}